PATHMac OS 8 Developer Documentation > Operating System Services > Multiprocessing Services >

Adding Multitasking Capability to Applications Using Multiprocessing Services

   

MPYield

Allows a task to yield the processor to another task.

void MPYield (void);
DISCUSSION

This function indicates to the scheduler that another task can run. Other than possibly yielding the processor to another task or application, the call has no effect. Note that since tasks are preemptively scheduled, an implicit yield may occur at any point, whether or not this function is called.

In most cases you should not need to call this function. The most common use of MPYield is to release the processor when a task is in a loop in which further progress is dependent on other tasks, and the task cannot be blocked by waiting on a Multiprocessing Services resource. You should avoid such busy waiting whenever possible.

Note that you can call this function from an interrupt handler.

VERSION NOTES

Introduced with Multiprocessing Services 1.0.


© 1999 Apple Computer, Inc. – (Last Updated 07 May 99)